package com.ruoyi.ora.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ora.mapper.VoicePermissionMapper;
import com.ruoyi.ora.domain.VoicePermission;
import com.ruoyi.ora.service.IVoicePermissionService;

/**
 * 录音权限Service业务层处理
 * 
 * @author liuwp
 * @date 2025-03-20
 */
@Service
public class VoicePermissionServiceImpl implements IVoicePermissionService 
{
    @Autowired
    private VoicePermissionMapper voicePermissionMapper;

    /**
     * 查询录音权限
     * 
     * @param id 录音权限主键
     * @return 录音权限
     */
    @Override
    public VoicePermission selectVoicePermissionById(Long id)
    {
        return voicePermissionMapper.selectVoicePermissionById(id);
    }

    /**
     * 查询录音权限列表
     * 
     * @param voicePermission 录音权限
     * @return 录音权限
     */
    @Override
    public List<VoicePermission> selectVoicePermissionList(VoicePermission voicePermission)
    {
        return voicePermissionMapper.selectVoicePermissionList(voicePermission);
    }

    /**
     * 根据业务主键查询一条记录：录音权限
     *
     * @param voicePermission 录音权限
     * @return 录音权限
     */
    @Override
    public VoicePermission selectOneVoicePermission(VoicePermission voicePermission)
    {
        return voicePermissionMapper.selectOneVoicePermission(voicePermission);
    }

    /**
     * 新增录音权限
     * 
     * @param voicePermission 录音权限
     * @return 结果
     */
    @Override
    public int insertVoicePermission(VoicePermission voicePermission)
    {
        return voicePermissionMapper.insertVoicePermission(voicePermission);
    }

    /**
     * 修改录音权限
     * 
     * @param voicePermission 录音权限
     * @return 结果
     */
    @Override
    public int updateVoicePermission(VoicePermission voicePermission)
    {
        return voicePermissionMapper.updateVoicePermission(voicePermission);
    }

    @Override
    public int updateVoicePermissionCondition(VoicePermission voicePermission, VoicePermission voicePermissionCondition)
    {
        return voicePermissionMapper.updateVoicePermissionCondition(voicePermission, voicePermissionCondition);
    }

    /**
     * 批量删除录音权限
     * 
     * @param ids 需要删除的录音权限主键
     * @return 结果
     */
    @Override
    public int deleteVoicePermissionByIds(Long[] ids)
    {
        return voicePermissionMapper.deleteVoicePermissionByIds(ids);
    }

    /**
     * 删除录音权限信息
     * 
     * @param id 录音权限主键
     * @return 结果
     */
    @Override
    public int deleteVoicePermissionById(Long id)
    {
        return voicePermissionMapper.deleteVoicePermissionById(id);
    }

    /**
     * 条件删除录音权限
     *
     * @param voicePermission 录音权限
     * @return 结果
     */
    @Override
    public int deleteVoicePermissionByCondition(VoicePermission voicePermission)
    {
        return voicePermissionMapper.deleteVoicePermissionByCondition(voicePermission);
    }

}
